unit Unit3;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
    System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TMyAnonimousProcedureType = reference to procedure(AText: string);

  TForm3 = class(TForm)
    edTexto: TMemo;
    btTexto1: TButton;
    btTexto2: TButton;
    btNewText: TButton;
    edTextoSimples: TEdit;
    procedure btTexto1Click(Sender: TObject);
    procedure btTexto2Click(Sender: TObject);
    procedure btNewTextClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure AddTexto(AText: String);

  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.AddTexto(AText: String);
var
 A: TMyAnonimousProcedureType;
begin
 A := procedure(AText: string)
 begin
   EdTexto.Lines.Add(AText);
 end;
 A(AText);
end;

procedure TForm3.btNewTextClick(Sender: TObject);
begin
  if edTextoSimples.Text <> '' then
   AddTexto(edTextoSimples.Text);
end;

procedure TForm3.btTexto1Click(Sender: TObject);
begin
 AddTexto('Texto 1');
end;

procedure TForm3.btTexto2Click(Sender: TObject);
begin
  AddTexto('Texto 2');
end;

end.

